placesview: Don't do the same thing twice
authorMatthias Clasen <mclasen@redhat.com>
Sat, 9 May 2020 23:41:30 +0000 (19:41 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 9 May 2020 23:41:30 +0000 (19:41 -0400)
When the schema is supported, we want to remove
the error style class, not add it again. Pointed
out by RafaƂ Mikrut.

Fixes: #2724
gtk/gtkplacesview.c

index 290ac976ace30a3e197c7c9b580101f4234ddf44..8522372a435aced205504f23e36333a158131813 100644 (file)
@@ -1890,7 +1890,7 @@ out:
   if (scheme && !supported)
     gtk_widget_add_css_class (view->address_entry, GTK_STYLE_CLASS_ERROR);
   else
-    gtk_widget_add_css_class (view->address_entry, GTK_STYLE_CLASS_ERROR);
+    gtk_widget_remove_css_class (view->address_entry, GTK_STYLE_CLASS_ERROR);
 
   g_free (address);
   g_free (scheme);